<?php
/**
 * Created by JetBrains PhpStorm.
 * User: adilet
 * Date: 18.01.13
 * Time: 17:29
 * To change this template use File | Settings | File Templates.
 */

class Application_Form_Upload extends Zend_Form
{
  public function init()
  {
    $this->setName('upload_form')
      ->setMethod('post')
      ->setAttrib('enctype', 'multipart/form-data');


    $image = new Zend_Form_Element_File('image');
    $image->setAttrib('placeholder', 'Изображение')
      ->addValidator('Size', false, 1024000)
      ->addValidator('Extension', false, 'jpg,png,gif');
    $this->addElement($image);


    $submit = new Zend_Form_Element_Submit('submit');
    $submit->setLabel('Загрузить');
    $this->addElement($submit);

  }

}


